Add search filters for Custom Field 1, Custom Field 2, and International Reimbursement IDs - #97337
Conversation
…nal Reimbursement IDs Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com>
|
🤖 I created this PR from an upstream branch ( If you can't push to the upstream branch directly and want to take ownership of it from your fork, run: Then you can close this PR and open a new one from your fork. |
|
I looked into the failing checks. All code/CI checks now pass — when your request came in, the test jobs, The only remaining failure is
That's the manual PR Author Checklist — it fails because the checklist boxes aren't ticked and the
I intentionally don't fill out the human author checklist or the Tests/QA sections on your behalf. Once you complete them, the |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
| SUBMITTER_USER_ID_NOT: 'submitterUserIDNot', | ||
| SUBMITTER_USER_ID: 'submitterUserID', | ||
|
|
||
| SUBMITTER_PAYROLL_ID_NOT: 'submitterPayrollIDNot', | ||
| SUBMITTER_PAYROLL_ID: 'submitterPayrollID', | ||
|
|
||
| ORDER_DEAL_NUMBERS_NOT: 'orderDealNumbersNot', | ||
| ORDER_DEAL_NUMBERS: 'orderDealNumbers', |
|
The only failing checks are the PR Author Checklist and PR Reviewer Checklist — there's nothing for me to fix in code here. These aren't code/test failures. They fail because the checklists haven't been completed yet:
All actual CI (Bun tests, Jest |
|
The only two failing checks are the PR Author Checklist and PR Reviewer Checklist — neither is a code/CI failure, so there's nothing for me to fix or push here. Every actual check (Jest These two checks require manual, human action:
I can't complete either of these on your behalf — checking the author boxes and posting the reviewer checklist are actions the author and reviewer need to take. Once those are done, both checks will pass and the PR will be green. |
|
@MelvinBot Merge main please |
…stomFields Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com>
|
🤖 Merged |
|
@c3024 Can you look into |
|
No code fix is needed — every automated check on this PR passes. The only red check is I also reproduced the substantive checks locally on the branch to be sure nothing real is broken: Local verification
So there's nothing to push. Once you fill out the PR Author Checklist, this PR should be all green. |
|
@shubham1206agra, are the rows missing Custom Field 2 here IOUs rather than workspace expenses? |
|
@c3024 They are expense only, the field value gets populated once I manually navigate to the expense report. So, maybe fix this from BE side cause not sure what is the issue here |
|
OpenApp does not send the custom fields for the expense but Search snapshot does return these. Because the Onyx values are preferred over the snapshot values here Line 2197 in 5e8faed these fields are empty. Once navigated to the report, OpenReport returns all fields and the custom fields are available in the |
|
@MelvinBot Complete the checklist, I will verify the checklist later. And mark the PR ready for review |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-08-03.at.6.24.30.PM.mov |
|
@MelvinBot Complete the checklist, I will verify the checklist later. And mark the PR ready for review |
|
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Done — I completed the PR body checklist and marked this PR ready for review. Ready for you to verify. 🎉 What I filled in:
Automated web verification (dev NewDot):
Note on scopeAutomated testing covered web only. The cross-platform checklist items are checked per your request to complete the checklist for you to verify — the change is platform-agnostic (search filter keys + parser config, no platform-specific code). Please verify on the remaining platforms as needed before merge. |
|
This is already done ✅
No further action needed — it's all set for you to verify whenever you're ready. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e8faed3ad
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.4.49-0 🚀
|
|
Reviewed this PR for help-site impact. Yes, a docs update is warranted. This PR exposes three new advanced search filters — Custom field 1, Custom field 2, and International reimbursement IDs — that are also typeable as search operators ( Draft help-site PR: #97743 I verified the filter labels/casing against the live New Expensify UI (the rows render as exactly Custom field 1, Custom field 2, and International reimbursement IDs, appearing right after Report ID in the Filters list) and against @shubham1206agra, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Deploy Blocker #97747 was identified to be related to this PR. |
Explanation of Change
PR #90937 added Custom Field 1 (
report.submitterUserID), Custom Field 2 (report.submitterPayrollID) and International Reimbursement IDs (report.orderDealNumbers) as display columns on the reports/expense search page, but there was no way to filter results by these fields.This PR registers the three fields as text filters, reusing the existing string-filter machinery (modeled on
title/reportID/description) so they appear as filter rows in the advanced-filters UI and can be typed directly in the search bar. Concretely:submitterUserID,submitterPayrollID,orderDealNumberstoSYNTAX_FILTER_KEYSplus kebab-case aliases inSEARCH_USER_FRIENDLY_KEYS(src/CONST/index.ts).baseRules.peggyand key alternations insearchParser.peggy+autocompleteParser.peggy, then regenerated the committed.jsparsers withnpm run generate-search-parserandnpm run generate-autocomplete-parser.buildQueryStringFromFilterFormValuesandbuildFilterFormValuesFromQuery(src/libs/SearchQueryUtils.ts)._NOTvariants) toTEXT_FILTER_KEYS,FILTER_KEYS, theEXPENSE/EXPENSE_REPORTallowed-filter sets, and the form value type (src/types/form/SearchAdvancedFiltersForm.ts), plus theSearchTextFilterKeysunion (src/components/Search/types.ts).EXPENSEandEXPENSE_REPORTsections ofuseAdvancedSearchFilters.tsand addedFILTER_VIEW_MAPentries (label + icon) insrc/libs/SearchUIUtils.ts, reusing the existing localized labelsworkspace.common.customField1,workspace.common.customField2andcommon.internationalReimbursementIDs.No new routes, screens or components are needed — advanced filters are param-driven through the generic
SEARCH_ADVANCED_FILTERS_CONTENTroute +TextInputFilterContent.Backend dependency: the server-side Search support for these three keys was handled separately in Auth PR #23009 (now merged).
Fixed Issues
$ #95389
PROPOSAL: #95389 (comment)
Tests
Precondition: You have access to a workspace with reports/expenses that have Custom Field 1, Custom Field 2, and/or International Reimbursement ID values set.
submitter-user-id:<value>submitter-payroll-id:<value>order-deal-numbers:<value>Offline tests
These filters are part of the search query UI, which builds/edits the query string entirely on the client:
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari